def operation (a,b,operator):
    """
    计算器，输入两个数a,b和运算符，可以计算
    """
    if operator == '+':
        return a + b
    elif operator == '-':
        return a - b
    elif operator == '*':
        return a * b
    elif operator == '/':
        return a / b
    elif operator == '//':
        return a // b
    elif operator == '%':
        return a % b

flag = 1
while flag == 1 :
    operator = input("请输入你要进行的运算方式(+、-、*、/、//、%）：\n")
    a = int(input("请输入一个数a："))
    b = int(input("请输入一个数b："))
    print("a和b的计算结果为：",operation(a,b,operator))
    flag = int(input("继续1，退出0\n"))